package com.hulk.boot.zookeeper.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author 作者 cmt
 * @version 创建时间：2016年6月2日 下午11:05:36 类说明
 */

@ConfigurationProperties(prefix = "spring.zookeeper")
public class ZookeeperProperties {

	private String serverLists;

	/**
	 * 命名空间.
	 */

	private String namespace;

	/**
	 * 等待重试的间隔时间的初始值. 单位毫秒.
	 */

	private int baseSleepTimeMilliseconds;

	/**
	 * 等待重试的间隔时间的最大值. 单位毫秒.
	 */

	private int maxSleepTimeMilliseconds;

	/**
	 * 最大重试次数.
	 */

	private int maxRetries;

	/**
	 * 会话超时时间. 单位毫秒.
	 */

	private int sessionTimeoutMilliseconds;

	/**
	 * 连接超时时间. 单位毫秒.
	 */

	private int connectionTimeoutMilliseconds;

	/**
	 * 连接Zookeeper的权限令牌. 缺省为不需要权限验证.
	 */

	private String digest;

	/**
	 * 内嵌Zookeeper的端口号. -1表示不开启内嵌Zookeeper.
	 */

	private int nestedPort = -1;

	/**
	 * 内嵌Zookeeper的数据存储路径. 为空表示不开启内嵌Zookeeper.
	 */

	private String nestedDataDir;

//	private String localPropertiesPath;

//	private String overwrite;

	public String getServerLists() {
		return serverLists;
	}

	public String getNamespace() {
		return namespace;
	}

	public int getBaseSleepTimeMilliseconds() {
		return baseSleepTimeMilliseconds;
	}

	public int getMaxSleepTimeMilliseconds() {
		return maxSleepTimeMilliseconds;
	}

	public int getMaxRetries() {
		return maxRetries;
	}

	public int getSessionTimeoutMilliseconds() {
		return sessionTimeoutMilliseconds;
	}

	public int getConnectionTimeoutMilliseconds() {
		return connectionTimeoutMilliseconds;
	}

	public String getDigest() {
		return digest;
	}

	public int getNestedPort() {
		return nestedPort;
	}

	public String getNestedDataDir() {
		return nestedDataDir;
	}

	

	public void setServerLists(String serverLists) {
		this.serverLists = serverLists;
	}

	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}

	public void setBaseSleepTimeMilliseconds(int baseSleepTimeMilliseconds) {
		this.baseSleepTimeMilliseconds = baseSleepTimeMilliseconds;
	}

	public void setMaxSleepTimeMilliseconds(int maxSleepTimeMilliseconds) {
		this.maxSleepTimeMilliseconds = maxSleepTimeMilliseconds;
	}

	public void setMaxRetries(int maxRetries) {
		this.maxRetries = maxRetries;
	}

	public void setSessionTimeoutMilliseconds(int sessionTimeoutMilliseconds) {
		this.sessionTimeoutMilliseconds = sessionTimeoutMilliseconds;
	}

	public void setConnectionTimeoutMilliseconds(int connectionTimeoutMilliseconds) {
		this.connectionTimeoutMilliseconds = connectionTimeoutMilliseconds;
	}

	public void setDigest(String digest) {
		this.digest = digest;
	}

	public void setNestedPort(int nestedPort) {
		this.nestedPort = nestedPort;
	}

	public void setNestedDataDir(String nestedDataDir) {
		this.nestedDataDir = nestedDataDir;
	}

//	public String getLocalPropertiesPath() {
//		return localPropertiesPath;
//	}
//
//	public String getOverwrite() {
//		return overwrite;
//	}
//	public void setLocalPropertiesPath(String localPropertiesPath) {
//		this.localPropertiesPath = localPropertiesPath;
//	}
//
//	public void setOverwrite(String overwrite) {
//		this.overwrite = overwrite;
//	}

	
	
}
